package net.lanelife.casino.caipiao.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

import net.lanelife.casino.common.entity.annotation.Checked;
import net.lanelife.casino.common.entity.enumeration.DataType;
import net.lanelife.casino.common.entity.support.CheckableEntity;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "TB_ACTIVITY_CONFIG")
public class ActivityConfig extends CheckableEntity<Integer> {

	private static final long serialVersionUID = 424803107057320635L;

	@Checked
	@Column(name = "NAME", length = 20, nullable = false)
	private String name;

	@Checked
	@Column(name = "CODE", length = 200, nullable = false, unique = true)
	private String code;

	@Checked
	@Column(name = "VALUE", length = 200, nullable = false)
	private String value;

	@Checked
	@Enumerated(EnumType.ORDINAL)
	@Column(name = "DATA_TYPE", nullable = false)
	private DataType dataType;

	@Checked
	@Column(name = "ACTIVITY_ID", nullable = false)
	private Integer activityId;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public DataType getDataType() {
		return dataType;
	}

	public void setDataType(DataType dataType) {
		this.dataType = dataType;
	}

	public Integer getActivityId() {
		return activityId;
	}

	public void setActivityId(Integer activityId) {
		this.activityId = activityId;
	}

}
